1. Field of the Invention
The present invention relates to a communication system including a master device and a plurality of slave devices with which the master device performs communication, and an electronic control unit including such a communication system for vehicle control.
2. Description of Related Art
Electronic Control Units used for vehicle control (referred to as “ECU” hereinafter) include a configuration in which a master device (a microcomputer, for example) communicates with a plurality of slave devices (ICs or LSIs, for example).
It is known to provide, between the master device and the slave devices of such an ECU, a switching circuit having a function of selecting from among a plurality of communication paths in accordance with a switch control signal received from the master device. For example, refer to Japanese Patent Applications Laid-open No. 5-134982, and No. 4-203343.
The apparatus disclosed in Japanese Patent Application Laid-open No. 5-134982 has a configuration in which a first microcomputer as a master device is connected to a second microcomputer and an A/D converter as slave devices through a switching circuit.
In this apparatus, the first microcomputer, which operates on the basis of a predetermined program, communicates with one of the second microcomputer and the A/D converter, which can be arbitrarily selected by setting a switching control signal supplied to the switching circuit at an active level or an inactive level.
However, the configuration in which the switching circuit is provided midway of the communication path causes a problem in that wiring in the apparatus becomes complicated, which causes the circuit scale and the production cost of the apparatus to increase.
To cope with this problem, it is known to use chip select signals for performing communication between a master device and a plurality of slave devices. For example, refer to Japanese Patent Application Laid-open No. 5-303545. This patent document discloses that a data transmission device as a master device is connected to a plurality of microcomputers as slave devices through a common communication path for data communication. In addition, the data transmission device and these microcomputers are connected through control lines carrying chip select signals (the control lines being referred to as “CS lines” hereinafter).
When the data transmission device sets one of the chip select signals to an active level, one of the microcomputers that has received the chip select signal at the active level determines that communication with the data transmission device is permitted, and sends data to the data transmission device.
That is, the data transmission device can perform communication with any desired microcomputer without causing data collision by setting one of the chip select signals to the active level, and setting the other chip select signals at the non-active level.
In the above described conventional apparatuses, the control of the switch control signal or the chip select signals is implemented by a software processing in the master device. For example, in the apparatus disclosed in Japanese Patent Application Laid-open No. 5-303545, the data transmission device has port terminals corresponding to the CS lines and port latches corresponding to the port terminals, and a CPU of the data transmission device executes a predetermined program to cause the port latches to latch data. For example, when one of these port latch latches “1”, the chip select signal of this port latch becomes active level, while when it latches “0”, this chip select signal becomes inactive level.
However, the above described conventional technique in which the master device performs a software processing for switching a plurality of communication objects, increase in the load of the master device caused by performing the software processing presents a problem. Especially, this problem becomes conspicuous when the frequency of a communication clock is high, that is when it is required to perform communication at high speed.